|
![](/i/fill.gif) |
Chris B wrote:
> The main advantage with using variables in this way is that you can
> specify just the variables you need
Yes, I reckoned you used that mechanism for more convenient
default values. However, it's not quite true you only need to
specify the variables you need: you also need to reset those
which have been modified for some previous invocation of
the macro, and you may not always be aware of those.
That problem could be prevented by having two macros for
each object, the first one just resetting the defaults:
#macro Begin_Cabinet()
#declare WIDTH = 0.6
...
#end
#macro End_Cabinet()
union
{
...
}
#end
Begin_Cabinet()
#declare WIDTH = 0.7
End_Cabinet()
It would also remove the need for all those #ifndef's.
Post a reply to this message
|
![](/i/fill.gif) |